package com.efrei.schoolmanager.model.obj;

import java.io.Serializable;

import com.efrei.schoolmanager.exceptions.LogicException;


public class Matiere implements Serializable {
	private static final long serialVersionUID = 2915532253465357981L;
	
	/** Attributes */
	private int matiereId;
	private String nom;

	public Matiere() {
	}

	public Matiere(String nom) throws LogicException {
		super();
		if(nom==null || nom.equals(""))
			throw new LogicException("nom vide");
		this.nom = nom;
	}
	
	@Override
	public String toString() {
		return nom;
	}

	public int getMatiereId() {
		return matiereId;
	}

	public void setMatiereId(int matiereId) {
		this.matiereId = matiereId;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) throws LogicException {
		if(nom==null || nom.equals(""))
			throw new LogicException("nom vide");
		this.nom = nom;
	}
}

